home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple Developer Connection Student Program
/
ADC Tools Sampler CD Disk 3 1999.iso
/
Documentation
/
Books
/
Learn Java on the Macintosh
/
Learn Java Projects
/
11.02 - paint hello
/
PaintHello.java
< prev
next >
Wrap
Text File
|
1996-04-22
|
464b
|
18 lines
/* -------------------------------------------------------------
This applet displays a friendly greeting.
Java's classes: Applet (applet)
Graphics (awt)
Custom classes: PaintHello
------------------------------------------------------------- */
import java.awt.Graphics;
public class PaintHello extends java.applet.Applet {
public void paint(Graphics g) {
g.drawString("Hello, applet!", 80, 50); // draw at x = 50, y = 50
}
}